<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .file {
            position: absolute;
            top: 10px;
            display: block;
            width: 100px;
            height: 100px;
            opacity: 0;
        }
        .btn {
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
    <input type="file" class="file">
    <div class="btn"></div>
    <audio id="mp3" src="./jay.mp3" controls></audio>
    <button class="play">play</button>
    <script>
        var btn = document.querySelector('.play');
        var mp3 = document.querySelector('#mp3');
        btn.onclick = function() {
            // 判断当前播放状态
            if(mp3.paused) {
                mp3.play()
            }else {
                mp3.pause()
            }
        }
    </script>
</body>
</html>